<html>
  <style>
    body {
	display:block;
	margin:0 100px auto; /* for the rest */
	height: 420mm;
	width: 297mm;
    }

    .page {
	height:100%;
	width: 100%;
    }

    .printHeader {
	font-size:22px;
	font-weight:bold;
    }

    .printSubHeader {
	font-size:11px;
	display:inline;
    }

    .printSubHeader-right {
	text-align:right;
        width:30%;
        position:relative;
        font-size:15px;
        font-weight:bold;
        float: right;
    }

    .printSubHeader-left {
	text-align:left;
        position:relative;
        width:70%;
        float: left;
    }

    .printFooter {
        font-size:12px;
	text-align:left;
        float:left;
	width:100%;
    }

    .printBill {
        float:left;
        padding: 15px 0;
        width:100%;
    }

    .billHeader {
        height:120px;
    }


    .billFooter {
        text-align: right;
    }

    .numeric {
       text-align: right;
    }

  </style>
<body>
  <div class="page">
    <div class="printHeader">
      THEME TOURS AND TRAVELS
    </div>

    <div class="printSubHeader" >
      <div class="printSubHeader-left">
	<strong>Shri Krishna Niwas, D. J. Road, Vile Parle (W) MUMBAI - 400056. INDIA</strong> <br />
	Tele : <strong>+91 22 66789770</strong>
      </div>
      <div class="printSubHeader-right">
	INVOICE
      </div>
    </div>

    <div class="printBill">
      <table width='100%' border='1px solid' cellspacing='0px' cellpading='0px'>
	<tr class='billHeader'>
	  <td colspan=5>
	    <div>
	      {{ client.display_name }}<br />
	      {{ client.address_line1 }}<br />
	      {{ client.address_line2 }}<br />
	      {{ client.city }}, {{ client.state }}<br />
	      {{ client.country }}, {{ client.zip }}<br />

	    </div>
	  </td>
	  <td colspan=3>
	    <div>
	      <div> Invoice No: {{ sale.sales_transaction_no }} </div>
	      <div> Date: {{ sale.sales_date }} </div>
	    </div>
	  </td>
	</tr>
	<tr>
	  <th colspan=1>Ticket No</th>
	  <th colspan=4>Description</th>
	  <th colspan=3>Amount (Rs.)</th>
	</tr>

	{% for pax in paxInfo %}
	<tr>
	  <td style="valign:top;"> {{ pax.transaction_no }} </td>
	  <td colspan=4> {{ pax.pax_name }} <br />
	    {{pax.sector_from1 }} - {{ pax.sector_to1}}&nbsp;{{pax.airline_name1}}&nbsp;{{pax.travel_date1|date:"D d M Y"}}

	    {% if pax.sector_from2 %}
	    <br /> {{ pax.sector_from2 }} - {{ pax.sector_to2 }}&nbsp;{{ pax.airline_name2 }}&nbsp;{{pax.travel_date2|date:"D d M Y"}}
	    {% endif %}

	    {% if pax.sector_from3 %}
	    <br /> {{ pax.sector_from3 }} - {{ pax.sector_to3 }}&nbsp;{{ pax.airline_name3 }}&nbsp;{{pax.travel_date3|date:"D d M Y"}}
	    {% endif %}

	    {% if pax.sector_from4 %}
	    <br /> {{ pax.sector_from4 }} - {{ pax.sector_to4 }}&nbsp;{{ pax.airline_name4 }}&nbsp;{{pax.travel_date4|date:"D d M Y"}}
	    {% endif %}

	    {% if pax.sector_from5 %}
	    <br /> {{ pax.sector_from5 }} - {{ pax.sector_to5 }}&nbsp;{{ pax.airline_name5 }}&nbsp;{{pax.travel_date5|date:"D d M Y"}}
	    {% endif %}

	    {% if pax.sector_from6 %}
	    <br /> {{ pax.sector_from6 }} - {{ pax.sector_to6 }}&nbsp;{{ pax.airline_name6 }}&nbsp;{{pax.travel_date6|date:"D d M Y"}}
	    {% endif %}

	  </td>
	  <td colspan = 3 class="numeric">
	    {% if 1 == forloop.counter %}
	    {{ pax.basic_fare|add:pax.airline_taxes|add:sale.additional_service_charge }}
	    {% else %}
	    {{ pax.basic_fare|add:pax.airline_taxes }}
	    {% endif %}
	  </td>
	</tr>
	{% endfor %}

	<tr>
	  <td colspan=7 class="billFooter">Gross Total</td>
	  <td class="numeric"> {{ gross }}</td>
	</tr>

	<tr>
	  <td colspan=7 class='billFooter'>Add: Service Tax @ 1.24</td>
	  <td class="numeric">{{ tax|add:sale.round_off }}</td>
	</tr>

	<tr>
	  <td colspan=7 class='billFooter'>Less: Handling charges</td>
	  <td class="numeric">{{ sale.discount }} </td>
	</tr>

	<tr>
	  {% load numToword %}
	  <td colspan='6'>{{ sale.total|numToINR }} </td>
	  <td colspan='1' style="border-left:none">TOTAL Rs.</td>
	  <td colspan=1 class="numeric"> {{ sale.total }} </td>
	</tr>
      </table>
    </div>

    <div class="printFooter">
      <strong>E & O.E. </strong><br />
      <li>This is a 'Computer Generated Document' and does not require any official signature.</li>
      <li>You are requested to notify us immediately, if you find any discrepancies in the document. </li>
      <li>All payment must be crossed <strong>A/c Payee only</strong> and in favour of <b>M/s. THEME TOURS &amp; TRAVELS.</b></li>
      <li>Penal Interest will be charged in case payment is made after due date of the document. </li>
      <li>Service Tax Reg No: AAHFT6849F5D001</li>
    </div>
  </div>
</body>
</html>
